  <?php 
require_once("nav.php");

 ?>
       <div class="col-sm-9 col-md-10">
<!DOCTYPE html>
<html>
<head>
  <title>小说列表</title>
</head>
<body>
<h1><center>小说列表</center></h1></br>

 <table class="table table-hover">
 <tr>
  <th>小说类型ID</th>
  
  <th>小说类型</th>
  
  <th>操作</th>
 </tr>

<?php
  define('UserPhotoPath','../images/');
  static $count=0;
  foreach($data as $one){
    $count++;
    echo '<td>'.$one['tid'].'</td>';
    echo '<td>'.$one['typename'].'</td>';
    
    
    echo '<td>
    <a href="admin.php?c=type&m=noveltypeedit&id='.$one['tid'].' ">修改</a>| 
    <a href="admin.php?c=type&m=deltype&id='.$one['tid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a>
     </td>';
    echo '</tr>';  
  }
  echo '</table>';  
  echo "<table align='center'><tr><td>共有 {$count} 种小说</td></tr></table>";   
 ?>
 </body>
</html>

</div>

<?php 
require_once('footer.php');
 ?>